/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gui;

import dao.ChuongTrinhKhuyenMaiDAO;
import java.text.DateFormat;
import java.text.Format;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import pojo.Chuongtrinhkhuyenmai;


/**
 *
 * @author sangnguyen
 */
public class JInternalFrameChuongTrinhKhuyenMai extends javax.swing.JInternalFrame {

    /**
     * Creates new form JInternalFrameChuongTrinhKhuyenMai
     */
    private DefaultTableModel tbModel;
    private List<Chuongtrinhkhuyenmai> ls;
    private static String tenCTKM;
    private static String ngayBD;
    private static String ngayKT;
    private static Integer idCTKM;
    public static String getTenCTKM(){
        return tenCTKM;
    }
    public static String getNgayBD(){
        return ngayBD;
    }
    public static String getngayKT(){
        return ngayKT;
    }
    public static Integer getIDCTKM(){
        return idCTKM;
    }
    public void XoaTrang(){
        this.jTextFieldTenCTKM.setText("");
        this.jTextAreaGhiChu.setText("");
        this.jFormattedTextFieldNgayBD.setText("");  
        this.jFormattedTextFieldNgayKT.setText("");  
    }
    public JInternalFrameChuongTrinhKhuyenMai() {
        initComponents();
         this.tbModel = new DefaultTableModel(){
            public boolean isCellEditable(int rowIndex, int colIndex) {
                return false; 
        }
        };
        Format formatter = new SimpleDateFormat("dd-MM-yyyy");
        this.tbModel.addColumn("STT");
        //this.tbModel.addColumn("ID");
        this.tbModel.addColumn("Tên chương trinh");                
        this.tbModel.addColumn("Ngày bắt đầu");                
        this.tbModel.addColumn("Ngày kết thúc");                        
        this.tbModel.addColumn("Ghi chú");                        
        ls = ChuongTrinhKhuyenMaiDAO.SelectAllChuongtrinhkhuyenmai();
        for(int i=0;i<ls.size();i++)
        {
            Vector vt = new Vector();            
            vt.add(i+1);
            vt.add(ls.get(i).getTenctkm());            
            vt.add(formatter.format(ls.get(i).getNgaybatdau()));            
            vt.add(formatter.format(ls.get(i).getNgayketthuc()));            
            vt.add(ls.get(i).getGhichu());
            tbModel.addRow(vt);
        }        
        this.jTableChuongTrinhKM.setModel(tbModel);
        this.tenCTKM = "";
        this.ngayBD = "";
        this.ngayKT = "";
        this.idCTKM= 0;
        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jTextFieldTenCTKM = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jFormattedTextFieldNgayBD = new javax.swing.JFormattedTextField();
        jLabel4 = new javax.swing.JLabel();
        jFormattedTextFieldNgayKT = new javax.swing.JFormattedTextField();
        jLabel5 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextAreaGhiChu = new javax.swing.JTextArea();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTableChuongTrinhKM = new javax.swing.JTable();
        jButtonThoat = new javax.swing.JButton();
        jButtonXoaTrang = new javax.swing.JButton();
        jButtonXoa = new javax.swing.JButton();
        jButtonCapNhat = new javax.swing.JButton();
        jButtonThem = new javax.swing.JButton();
        jButtonChiTietKM = new javax.swing.JButton();

        setClosable(true);

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel1.setText("Chương Trình Khuyến Mãi");

        jLabel2.setText("Tên chương trình");

        jLabel3.setText("Ngày bắt đầu");

        jFormattedTextFieldNgayBD.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter(new java.text.SimpleDateFormat("dd-MM-yyyy"))));

        jLabel4.setText("Ngày kết thúc");

        jFormattedTextFieldNgayKT.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter(new java.text.SimpleDateFormat("dd-MM-yyyy"))));

        jLabel5.setText("Ghi chú");

        jTextAreaGhiChu.setColumns(20);
        jTextAreaGhiChu.setRows(5);
        jScrollPane1.setViewportView(jTextAreaGhiChu);

        jTableChuongTrinhKM.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {},
                {},
                {},
                {}
            },
            new String [] {

            }
        ));
        jTableChuongTrinhKM.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTableChuongTrinhKMMouseClicked(evt);
            }
        });
        jScrollPane2.setViewportView(jTableChuongTrinhKM);

        jButtonThoat.setText("Thoát");
        jButtonThoat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonThoatActionPerformed(evt);
            }
        });

        jButtonXoaTrang.setText("Xóa trắng");
        jButtonXoaTrang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonXoaTrangActionPerformed(evt);
            }
        });

        jButtonXoa.setText("Xóa");
        jButtonXoa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonXoaActionPerformed(evt);
            }
        });

        jButtonCapNhat.setText("Cập nhật");
        jButtonCapNhat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonCapNhatActionPerformed(evt);
            }
        });

        jButtonThem.setText("Thêm");
        jButtonThem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonThemActionPerformed(evt);
            }
        });

        jButtonChiTietKM.setText("Chi tiết chương trình khuyến mãi");
        jButtonChiTietKM.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonChiTietKMActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(24, 24, 24)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(jButtonChiTietKM)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jButtonThem, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jButtonCapNhat)
                                        .addGap(10, 10, 10)
                                        .addComponent(jButtonXoa, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jButtonXoaTrang)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jButtonThoat, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(layout.createSequentialGroup()
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel2)
                                            .addComponent(jLabel3)
                                            .addComponent(jLabel5))
                                        .addGap(18, 18, 18)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addGroup(layout.createSequentialGroup()
                                                .addComponent(jFormattedTextFieldNgayBD, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                .addComponent(jLabel4)
                                                .addGap(18, 18, 18)
                                                .addComponent(jFormattedTextFieldNgayKT, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 449, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jTextFieldTenCTKM, javax.swing.GroupLayout.PREFERRED_SIZE, 449, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGap(0, 0, Short.MAX_VALUE))))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(151, 151, 151)
                                .addComponent(jLabel1)))
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldTenCTKM, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addGap(14, 14, 14)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jFormattedTextFieldNgayBD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3)
                    .addComponent(jLabel4)
                    .addComponent(jFormattedTextFieldNgayKT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel5)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonThoat)
                    .addComponent(jButtonXoaTrang)
                    .addComponent(jButtonXoa)
                    .addComponent(jButtonCapNhat)
                    .addComponent(jButtonThem)
                    .addComponent(jButtonChiTietKM))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 205, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonThoatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonThoatActionPerformed
        // TODO add your handling code here:
        this.dispose();
    }//GEN-LAST:event_jButtonThoatActionPerformed

    private void jButtonXoaTrangActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonXoaTrangActionPerformed
        // TODO add your handling code here:
        this.XoaTrang();
    }//GEN-LAST:event_jButtonXoaTrangActionPerformed

    private void jButtonXoaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonXoaActionPerformed
        // TODO add your handling code here:
        try {
            // TODO add your handling code here:
            int confirm = JOptionPane.showConfirmDialog(this, "Bạn có muốn xóa chương trình này không?", "Xác nhận", JOptionPane.YES_NO_OPTION);
            if(confirm == JOptionPane.YES_OPTION){
                int dong = this.jTableChuongTrinhKM.getSelectedRow();            
                Chuongtrinhkhuyenmai obj = ls.get(dong);                             
                obj.setTinhtrang(0);
                if(ChuongTrinhKhuyenMaiDAO.DeleteChuongtrinhkhuyenmai(obj)){
                    JOptionPane.showMessageDialog(this, "Đã xóa!"); 
                    tbModel.removeRow(dong);            
                    ls.remove(dong);
                    for(int i = 0;i<this.tbModel.getRowCount();i++)
                    {                
                        this.tbModel.setValueAt(i+1, i, 0);
                    }
                    this.jTableChuongTrinhKM.setModel(tbModel);
                }
            }
            else
            {
                JOptionPane.showMessageDialog(this, "Không xóa được!"); 
                return;
            }
        } catch (Exception ex){
            try {
                throw ex;
            } catch (Exception ex1) {
                Logger.getLogger(JInternalFrameQuyDinh.class.getName()).log(Level.SEVERE, null, ex1);
            }
        }
    }//GEN-LAST:event_jButtonXoaActionPerformed

    private void jButtonCapNhatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCapNhatActionPerformed
        // TODO add your handling code here:
        try {            
            // TODO add your handling code here:
            int confirm = JOptionPane.showConfirmDialog(this, "Bạn có muốn cập nhật thông tin chương trình này không?", "Xác nhận", JOptionPane.YES_NO_OPTION);
            if(confirm == JOptionPane.YES_OPTION){
                int dong = this.jTableChuongTrinhKM.getSelectedRow();            
                Chuongtrinhkhuyenmai obj = ls.get(dong);
                obj.setTenctkm(this.jTextFieldTenCTKM.getText());
                obj.setGhichu(this.jTextAreaGhiChu.getText());                        
                obj.setTinhtrang(1);
                //ngay sinh
                SimpleDateFormat formatDate = new SimpleDateFormat("dd-MM-yyyy");
                
                //String strBD = formatter.format(this.jFormattedTextFieldNgayBD.getValue());                        
                Date dayBD = new Date();
                try {
                    dayBD = (Date)formatDate.parse(this.jFormattedTextFieldNgayBD.getText());            
                } catch (ParseException ex) {
                    Logger.getLogger(JInternalFrameNhanVien.class.getName()).log(Level.SEVERE, null, ex);
                }              
                Date currentDate = new Date();
                currentDate=Calendar.getInstance().getTime(); 
                if(dayBD.before(currentDate))
                {
                    JOptionPane.showMessageDialog(this, "Ngày bắt đầu không hợp lệ");
                    return;
                }
                obj.setNgaybatdau(dayBD);
                //String strKT = formatter.format(this.jFormattedTextFieldNgayKT.getValue());                        
                Date dayKT = new Date();
                try {
                    dayKT = (Date)formatDate.parse(this.jFormattedTextFieldNgayKT.getText());            
                } catch (ParseException ex) {
                    Logger.getLogger(JInternalFrameNhanVien.class.getName()).log(Level.SEVERE, null, ex);
                }       
                obj.setNgayketthuc(dayKT);
                
                if(ChuongTrinhKhuyenMaiDAO.UpdateChuongtrinhkhuyenmai(obj)){
                    JOptionPane.showMessageDialog(this, "Cập nhật thành công!");                                                  
                    tbModel.setValueAt(obj.getTenctkm(), dong, 1);
                    tbModel.setValueAt(formatDate.format(dayBD), dong, 2);
                    tbModel.setValueAt(formatDate.format(dayKT), dong, 3);
                    tbModel.setValueAt(obj.getGhichu(), dong, 4);
                    this.tenCTKM = obj.getTenctkm();
                    this.ngayBD = formatDate.format(dayBD);
                    this.ngayKT = formatDate.format(dayKT);
                    this.idCTKM = obj.getIdctkm();
                }
            }   
            else
            {
                JOptionPane.showMessageDialog(this, "Cập nhật thất bại!");                                    
                return;
            }
         }        
         catch (Exception ex){
            try {
                throw ex;
            } catch (Exception ex1) {
                Logger.getLogger(JInternalFrameQuyDinh.class.getName()).log(Level.SEVERE, null, ex1);
            }
        }
    }//GEN-LAST:event_jButtonCapNhatActionPerformed

    private void jButtonThemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonThemActionPerformed
        // TODO add your handling code here:
         if(this.jTextFieldTenCTKM.getText().isEmpty()==true || this.jFormattedTextFieldNgayBD.getText().isEmpty()==true || this.jFormattedTextFieldNgayKT.getText().isEmpty()==true){
            JOptionPane.showMessageDialog(this, "Chưa nhập đầy đủ thông tin");
            return;
        }
        else
        {
            SimpleDateFormat formatDate = new SimpleDateFormat("dd-MM-yyyy");            
            Chuongtrinhkhuyenmai obj = new Chuongtrinhkhuyenmai();
            obj.setTenctkm(this.jTextFieldTenCTKM.getText());
            obj.setGhichu(this.jTextAreaGhiChu.getText());                        
            obj.setTinhtrang(1);
                                    
            //String strBD = formatter.format(this.jFormattedTextFieldNgayBD.getValue());                        
            Date dayBD = new Date();
            Date currentDate = new Date();
            
            try {
                dayBD = formatDate.parse(this.jFormattedTextFieldNgayBD.getText());    
                currentDate = Calendar.getInstance().getTime();                
            } catch (ParseException ex) {
                Logger.getLogger(JInternalFrameNhanVien.class.getName()).log(Level.SEVERE, null, ex);
            }                    
            if(dayBD.before(currentDate))
            {
                JOptionPane.showMessageDialog(this, "Ngày bắt đầu không hợp lệ");
                return;
            }
           // String strKT = formatter.format(this.jFormattedTextFieldNgayKT.getValue());                        
            Date dayKT = new Date();
            try {
                dayKT = (Date)formatDate.parse(this.jFormattedTextFieldNgayKT.getText());            
            } catch (ParseException ex) {
                Logger.getLogger(JInternalFrameNhanVien.class.getName()).log(Level.SEVERE, null, ex);
            } 
            if(dayKT.before(dayBD))
            {
                JOptionPane.showMessageDialog(this, "Ngày kết thúc không hợp lệ!");
                return;
            }
            obj.setNgaybatdau(dayBD);
            obj.setNgayketthuc(dayKT);            
            if(ChuongTrinhKhuyenMaiDAO.InsertChuongtrinhkhuyenmai(obj))
            {    
                JOptionPane.showMessageDialog(this, "Thêm thành công!");                                    
                Vector vt = new Vector();            
                vt.add(tbModel.getRowCount()+1);
                vt.add(obj.getTenctkm());
                vt.add(formatDate.format(dayBD));
                vt.add(formatDate.format(dayKT));
                vt.add(obj.getGhichu());                
                tbModel.addRow(vt);            
                ls.add(obj);
                this.jTableChuongTrinhKM.setModel(tbModel);
                this.tenCTKM = obj.getTenctkm();
                this.ngayBD = formatDate.format(dayBD);
                this.ngayKT = formatDate.format(dayKT);
                this.idCTKM = obj.getIdctkm();
            }
            else
            {
                JOptionPane.showMessageDialog(this, "Thêm thất bại!");                                    
            }
        }
    }//GEN-LAST:event_jButtonThemActionPerformed

    private void jButtonChiTietKMActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonChiTietKMActionPerformed
        // TODO add your handling code here:
        if(this.tenCTKM.isEmpty()==false)
        {
            System.out.print(this.tenCTKM);
            JDialogChiTietChuongTrinhKM frmChiTietKM = new JDialogChiTietChuongTrinhKM(null, closable);
            frmChiTietKM.setVisible(true);
        }        
        else
        {
            JOptionPane.showMessageDialog(this, "Chưa chọn chương trình khuyến mãi");
        }
            
    }//GEN-LAST:event_jButtonChiTietKMActionPerformed

    private void jTableChuongTrinhKMMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableChuongTrinhKMMouseClicked
        // TODO add your handling code here:
        this.XoaTrang();
        try{                   
            int dong = this.jTableChuongTrinhKM.getSelectedRow();
            if(dong>=0){                            
                if(this.jTableChuongTrinhKM.getValueAt(dong,1).toString().isEmpty()==false){                    
                    this.jTextFieldTenCTKM.setText(this.jTableChuongTrinhKM.getValueAt(dong,1).toString());
                }                             
                     
                if(this.jTableChuongTrinhKM.getValueAt(dong,4).toString().isEmpty()==false){                    
                    this.jTextAreaGhiChu.setText(this.jTableChuongTrinhKM.getValueAt(dong,4).toString());
                }        
                                                                              
                SimpleDateFormat formatDate = new SimpleDateFormat("dd-MM-yyyy");                
                String strBD = this.jTableChuongTrinhKM.getValueAt(dong,2).toString();                                        
                Date ngayBD= formatDate.parse(strBD);
                this.jFormattedTextFieldNgayBD.setValue(ngayBD);
                String strKT = this.jTableChuongTrinhKM.getValueAt(dong,3).toString();                                        
                Date ngayKT= formatDate.parse(strKT);
                //this.jFormattedTextFieldNgayKT.setText(strKT);
                this.jFormattedTextFieldNgayKT.setValue(ngayKT);
                this.tenCTKM = this.jTableChuongTrinhKM.getValueAt(dong,1).toString();
                this.ngayBD = strBD;
                this.ngayKT = strKT;
                Chuongtrinhkhuyenmai objCTKM = ls.get(dong);
                this.idCTKM = objCTKM.getIdctkm();
            }
        }
        catch (Exception ex){
            //throw ex;
        }
    }//GEN-LAST:event_jTableChuongTrinhKMMouseClicked

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonCapNhat;
    private javax.swing.JButton jButtonChiTietKM;
    private javax.swing.JButton jButtonThem;
    private javax.swing.JButton jButtonThoat;
    private javax.swing.JButton jButtonXoa;
    private javax.swing.JButton jButtonXoaTrang;
    private javax.swing.JFormattedTextField jFormattedTextFieldNgayBD;
    private javax.swing.JFormattedTextField jFormattedTextFieldNgayKT;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTable jTableChuongTrinhKM;
    private javax.swing.JTextArea jTextAreaGhiChu;
    private javax.swing.JTextField jTextFieldTenCTKM;
    // End of variables declaration//GEN-END:variables
}
